package com.oauth.service;

import com.oauth.model.OpenClient;
import com.oauth.model.OpenToken;
import org.apache.oltu.oauth2.common.exception.OAuthProblemException;

/**
 * Created by yangjianbo on 2016/9/29.
 */
public interface OpenTokenService {

    OpenToken insert(OpenToken openToken);

    OpenToken select(OpenToken openToken);

    OpenToken update(OpenToken openToken);

    OpenToken select(String clientId,String code);

    OpenToken select(String refresh_token);

    OpenToken selectByAccessToken(String token);
    /**
     * 客户端，code，重定向地址是否匹配
     * @param client_id
     * @param code
     * @param redirec_uri
     * @return
     */
    Boolean isMatched(String client_id,String code,String redirec_uri);

}
